from django.http import HttpResponse
from django.template import loader
from django.shortcuts import render


def page1(request):
    page_tmp = loader.get_template('page1.html')
    html = page_tmp.render()
    return HttpResponse(html)


def page2(request):
    return render(request, 'page2.html')


class Person:
    def __init__(self, name, age):
        self.name = name
        self.age = age


def kw_page1(request):
    return render(request, 'kw_page1.html', {"name": "Frank", "age": 28})


def obj_page(request):
    return render(request, 'obj_page.html', {"person":Person("Frank", 29)})
